<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>添加博客日志</title>
	<script type="text/javascript" src="${pageContext.request.contextPath }/js/fckeditor/fckeditor.js"></script>
  	 <link rel="stylesheet" type="text/css"
			href="${pageContext.request.contextPath }/styles/admin/addNoteUi.css" />
  </head>
  
  <body>
	  <jsp:include page="include/header.jsp" />
	  <!-- 引入相关js进行验证 -->
	  <script type="text/javascript" src="${pageContext.request.contextPath }/js/vdform.js"></script>
	  <script type="text/javascript">
	  	$("document").ready(function(){
	  		$("#addForm").checkForm();
	  		var fck = new FCKeditor("article.acontent");
	  		fck.BasePath="${pageContext.request.contextPath }/js/fckeditor/";
			fck.ReplaceTextarea();
	  	});
	  </script>
        <div id="right">
        	<h1> </h1>
            <div id="right_main">
            	<h2>添加博客日志</h2>
            	<form action="${pageContext.request.contextPath }/admin/noteManageAction_addNote.action" method="post" id="addForm">
            		<ul id="formMain">
            			<li>标题：<input type="text" name="article.atitle" class="title" validata-options="validType:'Require',msg:'标题不能为空'" /></li>
            			<li>
            				类别：<select name="article.category.cid" validata-options="validType:'Require',msg:'请选择类别'">
            						<c:forEach items="${requestScope.categoryList}" var="category">
            							<option value="${category.cid }">${category.cname }</option>
            						</c:forEach>
            					</select>　　　　　　　　　　
            				置顶：<input type="radio" value="1" name="article.atop" validata-options="validType:'Group',msg:'请选择是否置顶'"  />是　<input type="radio" value="0" name="article.atop" checked="checked" validata-options="validType:'Group',msg:'请选择是否置顶'" />否　
						</li>
						<li>作者：<input type="text" name="article.author" validata-options="validType:'Require',msg:'作者不能为空'" />　　　　　　标签：<input type="text" name="article.alabel" validata-options="validType:'Require',msg:'标签不能为空'" /></li>
            		</ul>
            		内容：<br/>
            		<textarea name="article.acontent"  style="height: 400px;"  ></textarea>
            		<br/>
            		
            		<input type="submit" value="添加日志" />
            	</form>
            </div>
        </div>
	<jsp:include page="include/footer.jsp" />
  </body>
</html>
